package tw101.bm;

/**
 * Created by Alan on 12/29/13.
 */
public class DiamondPrinter extends ShapePrinter {
    public static void main (String[] args) {
        int numLines = getN(args);
        new DiamondPrinter().makeShape(numLines);
    }

    void makeShape(int linesInTriangle) {
        new CenteredTrianglePrinter().makeShape(linesInTriangle);

        int spaces = 0;
        int asterisks = linesInTriangle*2 - 1;

        for (int linesLeft = linesInTriangle-1; linesLeft>0; linesLeft--) {
            spaces++;
            asterisks -= 2;
            printLine(spaces, asterisks);
        }
    }
}
